package com.tengju.settlement.domain.model.depository;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 系统源
 *
 * @author 大木
 * @date: 2021/12/6 1:54 下午
 */
@Getter
@AllArgsConstructor
public enum OriginType {

    SERVICE_CHARGE(1,"服务费系统"),
    TJ(2,"腾炬"),
    ;

    Integer val;
    String desc;

    public static OriginType of(Integer code) {
        if (code == null) {
            return null;
        }

        for (OriginType type : values()) {
            if (type.val.equals(code)) {
                return type;
            }
        }
        return null;
    }
}
